<?php

App::uses('AttachmentBehavior', 'Uploader.Model/Behavior');

class TestController extends AppController {
	
	public $name = 'Test';
	
	public $uses = array('Product');
	
	public function upload() {
		
		if( $this->request->is('post') ) {
			
			$this->request->data['Picture']['group'] = 'product';
			if( $this->Product->saveAssociated($this->request->data) ) {
				$this->Session->setFlash("Product Saved");
			}
			
		}
		
	}
	
}
